{if $CHANGE_REASON == 'true'}
{$FORM_RMA}
<div class="row">
    <div class="col-md-12 text-right">
        <a href="{$FILENAME_RMA}"><button type="button" class="btn btn-default">{$txt.TABLE_HEADING_SETTINGS_NAVI_OVERVIEW}</button></a>
        <a href="{$FILENAME_RMA_CHANGE}"><button type="button" class="btn btn-info">{$txt.TABLE_HEADING_SETTINGS_STATUS}</button></a>
        <a href="{$FILENAME_RMA_CHANGE_TEMPLATE}"><button type="button" class="btn btn-info">{$txt.TABLE_HEADING_TEMPLATE_STATUS}</button></a>
    </div>
</div>
<div class="row">
    <div class="col-md-12">
        <h2>{$txt.TABLE_HEADING_SETTINGS_REASON}</h2>
    </div>
    <div class="col-md-12">
        <table class="table table-bordered table-striped">
            {foreach name=item item=module from=$RMA_EDIT}
            {foreach name=itemedit item=module_item from=$module}
            <tr>
                <td>{$module_item.langname}{$module_item.hidden}</td>
                <td>{$module_item.rma_reason_name}</td>
                <td>{$module_item.delete_rma}</td>
            </tr>
            {/foreach}
            {/foreach}
        </table>
        {$RMA_SUBMIT}
    </div>
</div>
{$FORM_END}

<div class="row">
    {$FORM_RMA_REASON}
    <div class="col-md-12">
        <h2>{$txt.TABLE_HEADING_SETTINGS_REASON_NEW}</h2>
    </div>
    <div class="col-md-12">
        <table class="table table-bordered table-striped">
            {foreach name=item item=module_item from=$RMA_NEW}
            <tr>
                <td>{$module_item.langname}</td>
                <td>{$module_item.rma_new_reason_name}</td>
            </tr>
            {/foreach}
        </table>
        {$RMA_SAVE}
    </div>
</div>
{$FORM_END}
{/if}

{if $EDIT_STATUS == 'true'}
{$FORM_RMA}
<div class="row">
    <div class="col-md-12 text-right">
        <a href="{$FILENAME_RMA}"><button type="button" class="btn btn-default">{$txt.TABLE_HEADING_SETTINGS_NAVI_OVERVIEW}</button></a>
        <a href="{$FILENAME_RMA_CHANGE}"><button type="button" class="btn btn-info">{$txt.TABLE_HEADING_SETTINGS_REASON}</button></a>
		<a href="{$FILENAME_RMA_CHANGE_TEMPLATE}"><button type="button" class="btn btn-info">{$txt.TABLE_HEADING_TEMPLATE_STATUS}</button></a>
    </div>
</div>
<div class="row">
    <div class="col-md-12">
        <h2>{$txt.TABLE_HEADING_SETTINGS_STATUS}</h2>
    </div>
    <div class="col-md-12">
        <table class="table table-bordered table-striped">
            {foreach name=item item=module from=$RMA_STATUS_EDIT}
            {foreach name=itemedit item=module_item from=$module}
            <tr>
                <td>{$module_item.langname}{$module_item.hidden}</td>
                <td>{$module_item.rma_reason_name}</td>
                <td>{$module_item.delete_rma}</td>
            </tr>
            {/foreach}
            {/foreach}
        </table>
        {$RMA_STATUS_UPDATE}
    </div>
</div>
{$FORM_END}

<div class="row">
    {$FORM_RMA_STATUS_NEW}
    <div class="col-md-12">
        <h2>{$txt.TABLE_HEADING_SETTINGS_STATUS_NEW}</h2>
    </div>
    <div class="col-md-12">
        <table class="table table-bordered table-striped">
            {foreach name=item item=module_item from=$RMA_STATUS_NEW}
            <tr>
                <td>{$module_item.langname}</td>
                <td>{$module_item.rma_new_reason_name}</td>
            </tr>
            {/foreach}
        </table>
        {$RMA_STATUS_SAVE}
    </div>
</div>
{$FORM_END}
{/if}


{if $EDIT_TEXT == 'true'}
{$FORM_RMA_TEXT}
<div class="row">
    <div class="col-md-12 text-right">
        <a href="{$FILENAME_RMA}"><button type="button" class="btn btn-default">{$txt.TABLE_HEADING_SETTINGS_NAVI_OVERVIEW}</button></a>
        <a href="{$FILENAME_RMA_CHANGE_STATUS}"><button type="button" class="btn btn-info">{$txt.TABLE_HEADING_SETTINGS_STATUS}</button></a>
        <a href="{$FILENAME_RMA_CHANGE_REASON}"><button type="button" class="btn btn-info">{$txt.TABLE_HEADING_SETTINGS_REASON}</button></a>
    </div>
</div>
<div class="row">
    <div class="col-md-12">
        <h2>{$txt.TABLE_HEADING_SETTINGS_TEMPLATES}</h2>
    </div>
    <div class="col-md-12">
        <table class="table table-bordered table-striped">
            {foreach name=item item=module from=$RMA_STATUS_EDIT}
            {foreach name=itemedit item=module_item from=$module}
            <tr>
                <td>{$module_item.langname}{$module_item.hidden}</td>
                <td>{$module_item.rma_template_name}</td>
                <td>{$module_item.rma_template_text}</td>
                <td>{$module_item.delete_rma}</td>
            </tr>
            {/foreach}
            {/foreach}
        </table>
        {$RMA_STATUS_UPDATE}
    </div>
</div>
{$FORM_END}

<div class="row">
    {$FORM_RMA_STATUS_NEW}
    <div class="col-md-12">
        <h2>{$txt.TABLE_HEADING_SETTINGS_STATUS_NEW}</h2>
    </div>
    <div class="col-md-12">
        <table class="table table-bordered table-striped">
            {foreach name=item item=module_item from=$RMA_STATUS_NEW}
            <tr>
                <td>{$module_item.langname}</td>
                <td>{$module_item.rma_new_template_name}</td>
                <td>{$module_item.rma_new_template_text}</td>
            </tr>
            {/foreach}
        </table>
        {$RMA_STATUS_SAVE}
    </div>
</div>
{$FORM_END}
{/if}



{if $RMA_NEW == 'true'}
{$FORM_NEW_RMA}
<div class="row">
    <div class="col-md-12 text-right">
        <a href="{$FILENAME_RMA}"><button type="button" class="btn btn-default">{$txt.TABLE_HEADING_SETTINGS_NAVI_OVERVIEW}</button></a>
        <a href="{$FILENAME_RMA_CHANGE_STATUS}"><button type="button" class="btn btn-info">{$txt.TABLE_HEADING_SETTINGS_STATUS}</button></a>
        <a href="{$FILENAME_RMA_CHANGE_REASON}"><button type="button" class="btn btn-info">{$txt.TABLE_HEADING_SETTINGS_REASON}</button></a>
		<a href="{$FILENAME_RMA_CHANGE_TEMPLATE}"><button type="button" class="btn btn-info">{$txt.TABLE_HEADING_TEMPLATE_STATUS}</button></a>
    </div>
</div>
<div class="row">
    <div class="col-md-12">
        <h2>{$txt.TABLE_HEADING_ORDER_ID} / {$txt.TABLE_HEADING_RMA_ID}</h2>
    </div>
    <div class="col-md-12">
        <table class="table table-bordered table-striped">
            <tr>
                <td>{$txt.TABLE_HEADING_ORDER_ID} / {$txt.TABLE_HEADING_RMA_ID}</td>
                <td>{$RMA_OIDPULL} / {$RMA_OID}</td>
                <td>{$txt.TEXT_IF_PICKUP}</td>
                <td>{$RMA_PICKUP}</td>
            </tr>
            <tr>
                <td>{$txt.TABLE_HEADING_DATE}</td>
                <td>{$RMA_DATE}</td>
                <td>{$txt.TEXT_SHIPPING_TIME}</td>
                <td>{$RMA_SHIPPING_TIME}</td>
            </tr>
            <tr>
                <td>{$txt.TABLE_HEADING_DATE_EDIT}</td>
                <td>{$RMA_TIME}</td>
                <td>{$txt.TEXT_REASON}</td>
                <td>{$RMA_REASON_ID}</td>
            </tr>
            <tr>
                <td>{$txt.TABLE_HEADING_PRODUCT}</td>
                <td>{$RMA_PRODUCT} {$RMA_PRODUCT_SEARCH}</td>
                <td>{$txt.TEXT_PRODUCTS_EAN}</td>
                <td>{$RMA_PRODUCTS_EAN}</td>
            </tr>
            <tr>
                <td>{$txt.TABLE_HEADING_CUSTOMERS}</td>
                <td>{$RMA_CUSTOMER_KEYWORD} {$RMA_CUSTOMER_KEYWORD_SUBMIT}</td>
                <td>{$txt.TEXT_IF_COST_ESTIMATE}</td>
                <td>{$RMA_COST_ESTIMATE}</td>
            </tr>
        </table>
        <hr>
        <table class="table table-bordered table-striped">
            <tr>
                <td>{$txt.TEXT_DESCRIPTION}</td>
                <td>{$RMA_DESC}</td>
            </tr>
        </table>
        {$FORM_BRAKE}
        <hr>
        <div class="col-md-12">
            <h2>{$txt.RMA_OPTIONS}</h2>
        </div>
        <table class="table table-bordered table-striped">
            <tr>
                <td>{$txt.RMA_EDIT_STATUS}</td>
                <td>{$RMA_STATUS}</td>
                <td>{$txt.RMA_TEXT}</td>
                <td>{$RMA_STATUS_TEXT}</td>
                <td>{$RMA_STATUS_BUTTON_GO}</td>
            </tr>
        </table>
        <hr>
        <table class="table table-bordered table-striped">
            <tr>
                <td>{$txt.RMA_COMMENT}</td>
                <td>{$RMA_COMMENTS}</td>
            </tr>
            <tr>
                <td>{$txt.RMA_COMMENT_SEND}<br>{$txt.RMA_COMMENT_SEND_HELP}</td>
                <td>{$RMA_COMMENTS_SEND}</td>
            </tr>
            <tr>
                <td>{$txt.RMA_MAIL_SEND}</td>
                <td>{$RMA_MAIL_SEND}</td>
            </tr>
        </table>
        {$RMA_STATUS_SUBMIT}
    </div>
</div>
{$FORM_END}

{/if}

{if $RMA_OVEVIEW == 'true'}
	<div class="row">
		<div class="col-md-12">
			<h1><span class="glyphicon glyphicon-file"></span> {$txt.HEADING_TITLE}</h1>
		</div>
		<hr>
		<div class="col-md-12">
			<b><span class="glyphicon glyphicon-file"></span> {$txt.CONTENT_NOTE}</b>
		</div>
		<hr>
	</div>

	<div class="row">
		<div class="col-md-12 text-right">
			<a href="{$FILENAME_RMA_NEW}"><button type="button" class="btn btn-success">{$txt.TABLE_HEADING_SETTINGS_NEW_RMA}</button></a>
			<a href="{$FILENAME_RMA_CHANGE}"><button type="button" class="btn btn-info">{$txt.TABLE_HEADING_SETTINGS_STATUS}</button></a>
			<a href="{$FILENAME_RMA_CHANGE_REASON}"><button type="button" class="btn btn-info">{$txt.TABLE_HEADING_SETTINGS_REASON}</button></a>
			<a href="{$FILENAME_RMA_CHANGE_TEMPLATE}"><button type="button" class="btn btn-info">{$txt.TABLE_HEADING_TEMPLATE_STATUS}</button></a>
		</div>
		<hr>
	</div>
	{if $RMA_NO_ORDERS != 'true'}
	<div class="row">
		<div class="col-md-12">
			<table class="table table-bordered table-striped">
				<tr>
					<th>&nbsp;</th>
					<th>{$txt.TABLE_HEADING_RMA_ID}</th>
					<th>{$txt.TABLE_HEADING_ORDER_ID}</th>
					<th>{$txt.TABLE_HEADING_PRODUCT} / {$txt.TABLE_HEADING_CUSTOMERS}</th>
					<th>{$txt.TABLE_HEADING_DATE}</th>
					<th>{$txt.TABLE_HEADING_DATE_EDIT}</th>
					<th>{$RMA_SORT_FORM}{$RMA_SORT_PULL}{$FORM_END}</th>
				</tr>
				{$RMA_RMA_ACTION}
				{foreach name=item item=module_item from=$RMA_OVERVIEW}
				<tr>
					<td>{$module_item.status}</td>
					<td>{$module_item.link_rma}</td>
					<td>{$module_item.link_order}</td>
					<td>{$module_item.product_name} / {$module_item.link_customer}</td>
					<td>{$module_item.rma_date}</td>
					<td>{$module_item.rma_date_edit}</td>
					<td>{$module_item.rma_status_name}</td>
				</tr>
				{/foreach}
			</table>
		</div>
	</div>
	<div class="col-md-12">
		<h2>{$txt.TABLE_HEADING_ACTION}</h2>
	</div>
	<div class="col-md-12">
		{$RMA_ACTION}{$RMA_ACTION_SUBMIT}
	</div>

	{$FORM_END}
	{else}
	<div class="col-md-12">
		<h2>{$txt.NO_ORDERS}</h2>
	</div>
	{/if}
{/if}

{if $RMA_SHOWRMA == 'true'}
<div class="row">
    <div class="col-md-12">
        <h1><span class="glyphicon glyphicon-file"></span> {$txt.TABLE_HEADING_SETTINGS_NAVI}</h1>
    </div>
    <hr>
</div>
<div class="row">
    <div class="col-md-12 text-right">
        <a href="{$FILENAME_RMA}"><button type="button" class="btn btn-default">{$txt.TABLE_HEADING_SETTINGS_NAVI_OVERVIEW}</button></a>
        <a href="{$FILENAME_RMA_CHANGE}"><button type="button" class="btn btn-info">{$txt.TABLE_HEADING_SETTINGS_STATUS}</button></a>
        <a href="{$FILENAME_RMA_CHANGE_REASON}"><button type="button" class="btn btn-info">{$txt.TABLE_HEADING_SETTINGS_REASON}</button></a>
		<a href="{$FILENAME_RMA_CHANGE_TEMPLATE}"><button type="button" class="btn btn-info">{$txt.TABLE_HEADING_TEMPLATE_STATUS}</button></a>
    </div>
<hr>
</div>
<div class="row">
    <div class="col-md-12">
        <table class="table table-bordered table-striped">
            <tr>
                <td>{$txt.TABLE_HEADING_ORDER_ID} / {$txt.TEXT_RMA_ID}</td>
                <td>{$RMA_ORDER} ({$RMA_SHOW_STATISTIC})</td>
                <td>{$txt.TEXT_IF_PICKUP}</td>
                <td>{$RMA_PICKUP}</td>
            </tr>
            <tr>
                <td>{$txt.TABLE_HEADING_DATE}</td>
                <td>{$RMA_DATE}</td>
                <td>{$txt.TEXT_SHIPPING_TIME}</td>
                <td>{$RMA_SHIPPING_TIME}</td>
            </tr>
            <tr>
                <td>{$txt.TABLE_HEADING_DATE_EDIT}</td>
                <td>{$RMA_TIME}</td>
                <td>{$txt.TEXT_REASON}</td>
                <td>{$RMA_REASON_ID}</td>
            </tr>
            <tr>
                <td>{$txt.TABLE_HEADING_PRODUCT}</td>
                <td>{$RMA_PRODUCT}</td>
                <td>{$txt.TEXT_PRODUCTS_EAN}</td>
                <td>{$RMA_PRODUCTS_EAN}</td>
            </tr>
            <tr>
                <td>{$txt.TABLE_HEADING_CUSTOMERS}</td>
                <td>{$RMA_CUSTOMER_KEYWORD}</td>
                <td>{$txt.TEXT_IF_COST_ESTIMATE}</td>
                <td>{$RMA_COST_ESTIMATE}</td>
            </tr>
        </table>
        <table class="table table-bordered table-striped">
            <tr>
                <td>{$txt.TEXT_DESCRIPTION}</td>
                <td>{$RMA_DESCRIPTION}</td>
            </tr>
        </table>
        </div>

        {if $RMA_SHOW_STATISTIC == 'true'}
        <div class="col-md-12">
            <h2>{$txt.RMA_STATISTIC}</h2>
        </div>
		<div class="col-md-12">
        <table class="table table-bordered table-striped">
            {foreach name=item item=module_item from=$RMA_STATISTIC}
            <tr>
                <td>{$module_item.edit_date}</td>
                <td>{$module_item.comments}</td>
                <td>{$module_item.rma_status_id}</td>
            </tr>
            {/foreach}
        </table>
        </div>
        {else}
        <div class="col-md-12">
            <h2>{$txt.RMA_OPTIONS}</h2>
        </div>
        {$RMA_EDIT_RMA_FORM}{$RMA_EDIT_RMA_HIDDEN}
		<div class="col-md-12">
        <table class="table table-bordered table-striped">
            <tr>
                <td>{$txt.RMA_EDIT_STATUS}</td>
                <td>{$RMA_EDIT_RMA_STATUS}</td>
                <td>{$txt.RMA_TEXT}</td>
                <td>{$RMA_EDIT_RMA_TEXT} {$RMA_STATUS_BUTTON_GO}</td>
            </tr>
        </table>
        </div>
		<div class="col-md-12">
        <table class="table table-bordered table-striped">
            <tr>
                <td>{$txt.RMA_COMMENT}</td>
                <td>{$RMA_STATUS_COMMENTS}</td>
            </tr>
            <tr>
                <td>{$txt.RMA_COMMENT_SEND}<br>({$txt.RMA_COMMENT_SEND_HELP})</td>
                <td>{$RMA_STATUS_COMMENTS_MAIL_SEND}</td>
            </tr>
            <tr>
                <td>{$txt.RMA_MAIL_SEND}</td>
                <td>{$RMA_STATUS_COMMENTS_MAIL_SEND}</td>
            </tr>
        </table>
        </div>

        {$RMA_STATUS_COMMENTS_SUBMIT}
        {$FORM_END}
        {/if}
</div>
{/if}